package com.gosophia.metadataEngine.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.gosophia.commons.web.action.BaseSupportAction;
import com.gosophia.metadataEngine.dto.MetaDataFieldDto;
import com.gosophia.metadataEngine.ws.MetadataEngineWebService;
/**
 * 设置元数据表属性
 * @author wangxinbing
 * @since 2011.5.24
 */
@Controller("UpdateMetaDataFieldsAction")
@Scope("prototype")
public class UpdateMetaDataFieldsAction extends BaseSupportAction {
    
	private Long metaDataTableId;
	
	private List<MetaDataFieldDto> metaDataFieldDtos;
	
	@Autowired
	private MetadataEngineWebService metadataEngineWebService;
	@Override
	public String _execute() throws Exception {
		metadataEngineWebService.updateMetaDataFields(metaDataTableId,metaDataFieldDtos);
		return SUCCESS;
	}
	public Long getMetaDataTableId() {
		return metaDataTableId;
	}
	public void setMetaDataTableId(Long metaDataTableId) {
		this.metaDataTableId = metaDataTableId;
	}
	public List<MetaDataFieldDto> getMetaDataFieldDtos() {
		return metaDataFieldDtos;
	}
	public void setMetaDataFieldDtos(List<MetaDataFieldDto> metaDataFieldDtos) {
		this.metaDataFieldDtos = metaDataFieldDtos;
	}

	
}
